package analysis2;

public class Iteration
{
  public static void main(String[] args)
  {
    double xn = 3;
    double yn = 3;
    double rn = -1;
    double L = 5/16;
    
    for(int n = 0; n<25; n++)
    {
      double xtemp = xn;
      double ytemp = yn;
      xn = 1/xn+1/yn+2;
      yn = 1/(xtemp+yn)+2;
      rn = L/(1-L)*(Math.abs(xn-xtemp)+Math.abs(yn-ytemp));
      System.out.printf("%3s", n+"");
      System.out.printf("%20s", xn);
      System.out.printf("%20s", yn);
      System.out.printf("%10s", rn);
      System.out.println();
    }
  }
}
